﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Text;
using System.Windows.Forms;

namespace Campus.Main.Basic.InsertValues
{
    public partial class Yurt : Default
    {
        public Yurt():base()
        {
            InitializeComponent();
        }

        public Yurt(List<string> data):base(data)
        {
            InitializeComponent();
            id = data[0];
            textBox1.Text = data[1];
        }

        private void Yurt_Load(object sender, EventArgs e)
        {
            
        }

        protected override void button1_Click(object sender, EventArgs e)
        {
            if (textBox1.Text.Length > 0)
            {
                aToDb.UpdateTable("yurtdef", "description", textBox1.Text, id);
                Close();
            }
            else
            {
                textBox1.Clear();
                MessageBox.Show("Талааны толтургула!!!");
            }
        }
    }
}
